import Vue from "vue";
import App from "./App.vue";
import router from "./router";
import store from "./store";
import Vant from "vant";
import { Lazyload } from "vant";
import "vant/lib/index.css";
import axios from "axios";
import VueAwesomeSwiper from "vue-awesome-swiper";
import "swiper/css/swiper.min.css";
import "animate.css";
import {
  swiperAnimateCache,
  swiperAnimate,
  clearSwiperAnimate,
} from "@/assets/js/swiper.animate1.0.3.min.js";

Vue.use(VueAwesomeSwiper);

Vue.prototype.$swiperAnimateCache = swiperAnimateCache;
Vue.prototype.$swiperAnimate = swiperAnimate;
Vue.prototype.$clearSwiperAnimate = clearSwiperAnimate;

Vue.use(Vant);
Vue.use(Lazyload);

// axios配置根路径
axios.defaults.baseURL =
  "https://www.mahelei.com/index.php/Advance2024/Index"; //开发完成后，必须配置真正的请求地址
// axios.defaults.baseURL = 'http://127.0.0.1:8081' //开发阶段，配合proxy处理跨域问题
axios.defaults.headers["Content-Type"] = "multipart/form-data"; //指定请求头类型
// axios挂在到全局原型上,命名$http
Vue.prototype.$http = axios;

//按需导入elementui的Dialog组件
import { Dialog } from "element-ui";
Vue.component(Dialog.name, Dialog);

Vue.config.productionTip = false; //vue提示消息

//H5跳转至小程序的标签
Vue.config.ignoredElements = ["wx-open-launch-weapp"];

const app = new Vue({
  router,
  store,
  render: (h) => h(App),
});
app.$mount("#app");
